feat(test): adopt Scriptorium (Nib + Quill) as test framework - #144
Merged
Conversation
Replace the [<Fact>] + Erlang test_runner.erl discovery model with the Scriptorium test framework: Nib assertions and the Quill runner, matching ../Fable.Actor and ../Fable.Reactive. - Main.fs now runs Quill's runTests instead of an Erlang test runner - Convert a representative subset (Timer, Maps, GenServer = 29 tests) to per-module `tests` lists with direct BEAM bodies (no #if FABLE_COMPILER) - Consume Scriptorium from NuGet via explicit PackageReferences (Quill 0.5.1, Nib 0.4.1), pinned like ../Fable.Actor; pin Fable.Core 5.2.0 so Fable can transpile Scriptorium's shipped source against a known runtime - Drop the now-inert test/paket.references and remove test_runner.erl from the justfile pipeline (just test runs main:main/1) - Update CLAUDE.md / AGENTS.md docs Remaining Test*.fs files still use [<Fact>] and are not compiled yet; re-add each to Fable.Beam.Test.fsproj (before Main.fs) as it migrates.
Convert TestPort, TestSupervisor, TestLogger, TestFile, TestEts and TestJsx from [<Fact>] + Erlang test_runner discovery to Scriptorium (Nib assertions + Quill runner). This completes the suite migration: all 26 test files now expose a 'tests' value and run through Quill. Adds a ProjectReference to Fable.Beam.Jsx so TestJsx can resolve its bindings. 411 tests pass on BEAM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrate Fable.Beam's test suite onto Scriptorium (Nib assertions + Quill runner), following
../Fable.Actor/../Fable.Reactive, replacing the old[<Fact>]+ Erlangtest_runner.erldiscovery model.This is a draft that establishes the plumbing and converts a representative subset; remaining files migrate in follow-ups (noted in-commit and in
AGENTS.md/CLAUDE.md).Changes
Main.fsruns Quill'srunTestsinstead of an Erlang test runner (main:main/1)testslists with direct BEAM bodies (no#if FABLE_COMPILER)PackageReferences (Quill 0.5.1, Nib 0.4.1), pinned like../Fable.Actor; pinFable.Core5.2.0 so Fable transpiles Scriptorium's shipped source against a known runtimetest/paket.references; removetest_runner.erlfrom thejust testpipeline (now runsmain:main([]))CLAUDE.md/AGENTS.mdVerified
just test→ 29 passed on BEAM, exit 0; Quill halts non-zero on failuredotnet fantomas test --checkcleanNotes / follow-up
Test*.fsfiles still use[<Fact>]and aren't compiled yet — re-add each toFable.Beam.Test.fsproj(beforeMain.fs) as it migratestest_runner.erlleft on disk, unreferenced by the pipelinejust test-dotnetstill fails at runtime because Fable.Beam bindings are BEAM-only (pre-existing; its value is the compile step)